exports.errorPage = function(req,res,next){
    res.render404 = function(error){
        return res.status(404).render('404',{ layout:false });
    };
    res.renderError = function(error,statusCode){
        if(statusCode === undefined){
            statusCode = 400;
        }
        return res.status(statusCode).render('404',{ layout:false });
    };
    next();
};